﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Web.WangLuo2.Connection.MySQL.DAL;
//using是要拿来使用的工具

namespace Web.WangLuo2.Connection.MySQL.Controllers//控制器的命名空间
{
    public class StudentsController : Controller//子类继承父类，冒号前为子类，反之则为父类
    {
        private DAL_Students dalstudents = new DAL_Students();//利用实例化引用DAL中数据
        public IActionResult getStudents()//定义方法
        {
            return View(dalstudents.getStudents());//让数据返回视图
        }
    }
}

